// 优惠券类型枚举
export enum DiscountType {
  EVERY_FULL_REDUCTION = 1, // 每满减
  DISCOUNT = 2, // 折扣
  NO_THRESHOLD = 3, // 无门槛
  FULL_REDUCTION = 4, // 普通满减
}

// 获取方式枚举
export enum ObtainType {
  MANUAL = 1, // 手动领取
  EXCHANGE = 2, // 兑换码兑换
}

// 优惠券使用范围VO
export interface CouponScopeVO {
  key: number
  value: number
}

// 优惠券详情VO
export interface CouponDetailVO {
  id: string // 改为string类型
  name: string
  scopes: CouponScopeVO[]
  discountType: DiscountType
  thresholdAmount: number
  discountValue: number
  maxDiscountAmount: number
  issueBeginTime: string
  issueEndTime: string
  termDays: number
  termBeginTime: string
  termEndTime: string
  totalNum: number
  userLimit: number
  obtainWay: ObtainType
}

// 优惠券VO
export interface CouponVO {
  id: string // 改为string类型
  name: string
  specific: boolean
  discountType: DiscountType
  thresholdAmount: number
  discountValue: number
  maxDiscountAmount: number
  termDays: number
  termEndTime: string
  available: boolean
  received: boolean
}

export interface UserCouponQueryType {
  status: number
  pageNo: number
  pageSize: number
  isAsc: boolean
  sortBy: string
}

export interface OrderProductDTO {
    productId: number;
    quantity: number;
    price: number;
}

export interface CouponDiscountDTO {
    ids: string[];
    rules: string[];
    discountAmount: number;
}
